package com.handpay.zztong.hp.utils;

import java.util.HashMap;

import android.text.TextUtils;

import com.handpay.zztong.hp.R;

public class BankUtils {
    private static HashMap<String, Integer> mBanks = new HashMap<String, Integer>();
    static {
        mBanks.put("农业银行", R.drawable.abc);
        mBanks.put("中国银行", R.drawable.bc);
        mBanks.put("北京银行", R.drawable.bob);
        mBanks.put("交通银行", R.drawable.boc);
        mBanks.put("宁波银行", R.drawable.bon);
        mBanks.put("上海银行", R.drawable.bos);
        mBanks.put("包商银行", R.drawable.bsb);
        mBanks.put("建设银行", R.drawable.ccb);
        mBanks.put("光大银行", R.drawable.ceb);
        mBanks.put("广发银行", R.drawable.cgb);
        mBanks.put("招商银行", R.drawable.cmb);
        mBanks.put("民生银行", R.drawable.cmbc);
        mBanks.put("邮政储蓄银行", R.drawable.cp);
        mBanks.put("东亚银行", R.drawable.dy);
        mBanks.put("农村信用合作社", R.drawable.gzls);
        mBanks.put("哈尔滨银行", R.drawable.hrb);
        mBanks.put("华夏银行", R.drawable.hx);
        mBanks.put("工商银行", R.drawable.icbc);
        mBanks.put("兴业银行", R.drawable.isb);
        mBanks.put("平安银行", R.drawable.pa);
        mBanks.put("深圳发展银行", R.drawable.sdb);
        mBanks.put("上海农商银行", R.drawable.shns);
        mBanks.put("浦发银行", R.drawable.spdb);
        mBanks.put("浙江泰融商业银行", R.drawable.zjtl);
        mBanks.put("中信银行", R.drawable.zx);
        mBanks.put("南京银行", R.drawable.njcb);
        mBanks.put("未知银行", R.drawable.bankdefault);
    }
    public static int getBankIcon(String bank) {
        int result = R.drawable.bankdefault;
        if (!TextUtils.isEmpty(bank)) {
            Integer i = mBanks.get(bank);
            result = null == i? R.drawable.bankdefault : i;
        }
        return result;
    }
}
